Keir Fraser [Thu, 27 Jan 2011 16:17:27 +0000 (16:17 +0000)]
hvm: allow pass-through of new FPU/ALU CPUID features
there are some new CPUID features that are safe for guests to see, as
they don't require OS awareness (FPU/ALU related instructions only).
Among features for new AMD CPUs there is also the PCLMULQDQ bit, which
Intel CPU have already for quite a while.
Signed-off-by: Andre Przywara <andre.przywara@amd.com>
Wei Wang [Thu, 27 Jan 2011 16:12:07 +0000 (16:12 +0000)]
amd iommu: reduce io page level for hvm guest (3/3)
Clean up invalidate_iommu_page function. Make it suitable for variable
page sizes and can be reused by invalidate_all_iommu_pages.
Signed-off-by: Wei Wang <wei.wang2@amd.com>
Wei Wang [Thu, 27 Jan 2011 16:11:37 +0000 (16:11 +0000)]
amd iommu: reduce io page level for hvm guest (2/3)
Clean up amd_iommu_reserve_domain_unity_map function to reduce code
duplication.
Signed-off-by: Wei Wang <wei.wang2@amd.com>
Wei Wang [Thu, 27 Jan 2011 16:10:52 +0000 (16:10 +0000)]
amd iommu: reduce io page level for hvm guest (1/3)
Since in most case, 2 or 3 - level IO page tables are sufficient, this
patch updates page table level for device assignment to reduces
overhead of dma translation
Signed-off-by: Wei Wang <wei.wang2@amd.com>
Ian Jackson [Thu, 27 Jan 2011 14:59:04 +0000 (14:59 +0000)]
libxc: provide XENCTRL_HAS_XC_INTERFACE feature test macro
This makes it easier for out-of-tree callers to tell which version of
the libxc interface this version of xenctrl.h provides.
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Acked-by: Ian Campbell <Ian.Campbell@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
Fengzhe Zhang [Thu, 27 Jan 2011 11:31:46 +0000 (11:31 +0000)]
vtd: Fix for irq bind failure after PCI attaching 32 times
Originally when detaching a PCI device, pirq_to_emuirq and pirq_to_irq
are freed via hypercall do_physdev_op. Now in function
pt_irq_destroy_bind_vtd, duplicated logic is added to free
pirq_to_emuirq, but not pirq_to_irq. This causes do_physdev_op fail to
free both emuirq and irq. After attaching a PCI device for 32 times,
irq resources run out. This patch removes the redundant logic.
Signed-off-by: Fengzhe Zhang <fengzhe.zhang@intel.com>
John Weekes [Thu, 27 Jan 2011 09:37:19 +0000 (09:37 +0000)]
minios: Fix bug/build problem introduced in c/s 22799
With "debug=n", "make stubdom" currently fails in xen-unstable. This
patch addresses this through minor fixups.
Signed-off-by: John Weekes <lists.xen@nuclearfallout.net>
Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Christoph Egger [Wed, 26 Jan 2011 16:11:41 +0000 (16:11 +0000)]
libxl: rename xenstored pid file on Linux
Changset 22806:
eefb8e971be5 broke 'xl'.
After starting the xenstored, xenconsoled, xenbackendd and running xl
create I get this:
libxl: error: libxl.c:53:libxl_ctx_init Is xenstore daemon running?
failed to stat /var/run/xenstore.pid: No such file or directory
cannot init xl context
The reason for the failure is that the NetBSD startup script
creates the file
/var/run/xenstored.pid
but libxl checks for
/var/run/xenstore.pid
Attached patch makes this consistent across Linux and NetBSD by
changing the Linux name (to the more-conventional food.pid form).
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
Ian Jackson [Wed, 26 Jan 2011 16:05:09 +0000 (16:05 +0000)]
xl: avoid creating domains with duplicate names
Do not create the domain if another domain with the same name is already
running.
This is another error-checking function at rather too high a level:
this should be moved into libxl_domain_rename in 4.2.
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
Ian Jackson [Wed, 26 Jan 2011 11:58:45 +0000 (11:58 +0000)]
libxl: band-aid for functions which return literal "-1"
Many libxl functions erroneously return "-1" on error, rather than
some ERROR_* value.
To deal with this, invent a new ERROR_NONSPECIFIC "-1" which indicates
that "the function which generated this error code is broken".
Fix up the one we care about for forthcoming duplicate domain
detection (libxl_name_to_domid) and the others following the same
pattern nearby; leave the rest for post-4.1.
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Ian Campbell [Wed, 26 Jan 2011 11:47:52 +0000 (11:47 +0000)]
libxl: only check size of regular files when validating a virtual disk
st_size is only valid for regular files and not block devices.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
Keir Fraser [Wed, 26 Jan 2011 08:56:44 +0000 (08:56 +0000)]
x86: physdev_[un]map_pirq() use rcu_lock_target_domain_by_id().
More idiomatic, and avoids accidental failure to check caller
privilege. For example, the unmap path was not checking for any
privilege before calling unmap_domain_pirq_emuirq(), which can't be
right.
Signed-off-by: Keir Fraser <keir@xen.org>
Wei Gang [Wed, 26 Jan 2011 08:54:12 +0000 (08:54 +0000)]
x86: Fix pirq teardown on domain destruction.
The privilege check in unmap_domain_pirq() fails since the teardown
completes in RCU (idle domain) context. We can remove the check since
it is covered in physdev_op() already, which is the only potentially
unprivileged caller.
Signed-off-by: Wei Gang <gang.wei@intel.com>
Keir Fraser [Wed, 26 Jan 2011 08:45:40 +0000 (08:45 +0000)]
x86: blacklist new AMD CPUID bits for PV domains
there are some new CPUID bits (and leaves) which Dom0 and PV domains
should not see to avoid trouble, since we don't emulate the features.
The most prominent one is a topology leaf, which contains information
specific to the physical CPU, not the virtual one. To avoid confusion
(and possibly crashes) due to a confused Dom0 scheduler simply disable
these bits.
Signed-off-by: Andre Przywara <andre.przywara@amd.com>
Signed-off-by: Keir Fraser <keir@xen.org>
Keir Fraser [Wed, 26 Jan 2011 08:35:24 +0000 (08:35 +0000)]
x86: Do not pollute namespace with asm defns of PERFC_*.
This fixes the build with perfc=y.
Signed-off-by: Keir Fraser <keir@xen.org>
Keir Fraser [Wed, 26 Jan 2011 08:17:14 +0000 (08:17 +0000)]
amd iommu: Fix output and coding style
Signed-off-by: Wei Wang <wei.wang2@amd.com>
Gianni Tedesco [Tue, 25 Jan 2011 18:27:43 +0000 (18:27 +0000)]
xl: Check domain existance when doing domain identifier lookups
[ Code formatting fixed up to conform to libxl style. -iwj ]
Signed-off-by: Gianni Tedesco <gianni.tedesco@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
Ian Jackson [Tue, 25 Jan 2011 18:24:36 +0000 (18:24 +0000)]
xl: fix up some minor mistakes in error messages
perl -i~ -pe 's/\\n.\"/\\n\"/' tools/libxl/*.c
Reported-by: Gianni Tedesco <gianni.tedesco@citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Acked-by: Gianni Tedesco <gianni.tedesco@citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
Stefano Stabellini [Tue, 25 Jan 2011 18:22:09 +0000 (18:22 +0000)]
libxl: fix segfault on device assignement
Fix a xl/libxl segfault when assigning a device to the guest (bug
http://bugzilla.xensource.com/bugzilla/show_bug.cgi?id=1713).
Signed-off-by: Gianni Tedesco <gianni.tedesco@citrix.com>
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
Kamala Narasimhan [Tue, 25 Jan 2011 18:09:49 +0000 (18:09 +0000)]
xl: Perform minimal validation of virtual disk file while parsing config file
This patch performs some very basic validation on the virtual disk
file passed through the config file. This validation ensures that we
don't go too far with the initialization like spawn qemu and more
while there could be some potentially fundamental issues.
[ Patch fixed up to work with PHYSTYPE_EMPTY 22808:
6ec61438713a -iwj ]
Signed-off-by: Kamala Narasimhan <kamala.narasimhan@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
Stefano Stabellini [Tue, 25 Jan 2011 18:06:53 +0000 (18:06 +0000)]
libxl/xl: support empty disk paths (ejected cdroms)
Support empty disk paths, including in domain config files, for
compatibility with xend. This allows a domain to be created with a
cdrom which is initially in the "ejected" (no cd present) state.
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
Gianni Tedesco [Tue, 25 Jan 2011 17:02:47 +0000 (17:02 +0000)]
libxl: Check a domain exists before destroying it
Signed-off-by: Gianni Tedesco <gianni.tedesco@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
Kamala Narasimhan [Tue, 25 Jan 2011 16:59:47 +0000 (16:59 +0000)]
libxl: libxl_ctx_init checks for xenstored pid file
This is a proxy for whether xenstored is running. Otherwise the
failure modes are unfortunate (hangs, or mysterious error messages).
If and when we have a stubdom xenstored this will need to be
revisited, if not before.
Signed-off-by: Kamala Narasimhan <kamala.narasimhan@citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
user virtual [Tue, 25 Jan 2011 16:42:00 +0000 (16:42 +0000)]
tools/hotplug/Linux: fix completely wrong attempts to stop xenwatchdogd
"xen-watchdog stop" attempts to kill non existing "watchdogd" but
misses the running "xenwatchdogd". This also provokes errors during
install and Debian package management.
Signed-off-by: user virtual <virtualusr@gmail.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
Keir Fraser [Tue, 25 Jan 2011 14:07:39 +0000 (14:07 +0000)]
Update Xen version to 4.1.0-rc3-pre
Keir Fraser [Tue, 25 Jan 2011 14:07:08 +0000 (14:07 +0000)]
Added signature for changeset
9dca60d88c63
Keir Fraser [Tue, 25 Jan 2011 14:06:55 +0000 (14:06 +0000)]
Added tag 4.1.0-rc2 for changeset
9dca60d88c63
Keir Fraser [Tue, 25 Jan 2011 14:06:52 +0000 (14:06 +0000)]
Update Xen version to 4.1.0-rc2
Keir Fraser [Tue, 25 Jan 2011 14:05:25 +0000 (14:05 +0000)]
x86/tsc: remove misleading printk on HVM restore path.
This warning no longer corresponds to what the code actually does.
Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
Stefano Stabellini [Fri, 21 Jan 2011 18:06:23 +0000 (18:06 +0000)]
libxl, minios: stubdom console based save/restore
Add two "special" PV consoles to stubdoms that are going to be used
to send and receive the qemu-xen save files on save/restore.
Use the second PV console to send the qemu-xen save file and the third
PV console to receive the qemu-xen save file on restore.
Fix the console shutdown function free_consfront that is called when the
qemu save file is closed.
Stubdom save/restore is still broken with xend.
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
Ian Jackson [Fri, 21 Jan 2011 18:03:18 +0000 (18:03 +0000)]
QEMU_TAG update
Ian Jackson [Fri, 21 Jan 2011 18:00:39 +0000 (18:00 +0000)]
QEMU_TAG update
Stefano Stabellini [Fri, 21 Jan 2011 17:57:31 +0000 (17:57 +0000)]
tools: Change the name of the qemu save file at restore time
Change the name of the qemu save file to qemu-resume at restore time so
that it doesn't collide with the name of the next save file.
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
Ian Jackson [Fri, 21 Jan 2011 17:45:56 +0000 (17:45 +0000)]
libxl: Fix for Windows UP crash on boot using xl
When parameter "vcpus" is not explicitly set in config file, cur_vpus
is initialized to 0 instead of 1, which causes domU crash.
Signed-off-by: Fengzhe Zhang <fengzhe.zhang@intel.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
Kamala Narasimhan [Fri, 21 Jan 2011 17:44:07 +0000 (17:44 +0000)]
libxl: fix free of constant string in cdrom insert path
Signed-off-by: Kamala Narasimhan <kamala.narasimhan@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Tim Deegan [Fri, 21 Jan 2011 16:04:59 +0000 (16:04 +0000)]
Merge
Keir Fraser [Fri, 21 Jan 2011 16:01:12 +0000 (16:01 +0000)]
[VTD][QUIRK] turn off Sandybridge IGD quirk by default
Turn off Sandybridge IGD quirk by default until potential issues such
as MMIO register conflict with OS device driver and proper locking in
preamble and postamble functions are addressed.
Signed-off-by: Allen Kay <allen.m.kay@intel.com>
Keir Fraser [Fri, 21 Jan 2011 16:00:05 +0000 (16:00 +0000)]
svm: migrate pirq with vcpu
hvm_migrate_pirqs() is missing in svm_do_resume().
Signed-off-by: Wei Wang <wei.wang2@amd.com>
Keir Fraser [Fri, 21 Jan 2011 15:58:27 +0000 (15:58 +0000)]
x86:x2apic: Disable x2apic on x86-32 permanently
x2apic initialization on x86_32 uses vcpu pointer before it is
initialized. As x2apic is unlikely to be used on x86_32, this patch
disables x2apic permanently on x86_32. It also asserts the sanity of
vcpu pointer before dereference to prevent further misuse.
Signed-off-by: Fengzhe Zhang <fengzhe.zhang@intel.com>
Keir Fraser [Fri, 21 Jan 2011 15:57:18 +0000 (15:57 +0000)]
x86_32: Assert map_domian_page() not used too early.
Signed-off-by: Fengzhe Zhang <fengzhe.zhang@intel.com>
George Dunlap [Fri, 21 Jan 2011 15:37:36 +0000 (15:37 +0000)]
p2m: Allow non-leaf entries to be replaced by leaf entries
Allow l2 and l3 p2m tables to be replaced with 2MB and 1GB pages
respectively, freeing the p2m table page properly. This allows, for example,
a sequence of 512 singleton zero pages to be replaced with a superpage
populate-on-demand entry.
Changes:
* Add a p2m_free_ptp() corresponding to p2m_alloc_ptp(), which will
handle everything related to the freeing properly.
* Add p2m_free_entry(), based on ept_free_entry(), which will free
intermediate tables recursively.
* For both ept and p2m, when replacing non-leaf entries with leaf
entries, keep old entry and call *_free_entry() after new entry
has been written and proper flushes have been done.
Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
Ian Jackson [Thu, 20 Jan 2011 17:04:06 +0000 (17:04 +0000)]
libxl: Make domain_shutdown fail if graceful not possible
Currently "xl shutdown" (like "xm shutdown") is not capable of doing
the proper ACPI negotiation with an HVM no-pv-drivers guest which
would be necessary for a graceful shutdown.
Instead (following the ill-advised lead of "xm shutdown") it simply
shoots the guest in the head.
This patch changes the behaviour so that "xl shutdown" fails if the
domain cannot be shut down gracefully for this reason and suggests in
the error message using destroy instead.
Also, check whether the PV shutdown protocol is available before we
try to use it.
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
Ian Jackson [Thu, 20 Jan 2011 16:45:54 +0000 (16:45 +0000)]
QEMU_TAG update
Kouya Shimura [Thu, 20 Jan 2011 16:41:23 +0000 (16:41 +0000)]
xend: pci.py: fix open file descriptor leak
I got the following error:
$ xm pci-list-assignable-devices
Error: [Errno 24] Too many open files
Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
Ian Jackson [Thu, 20 Jan 2011 16:32:33 +0000 (16:32 +0000)]
libxl: do not attempt to write "shutdown" dm-command
libxl_domain_destroy writes the command "shutdown" to the xenstore
node with which it communicates with qemu. However:
- qemu does not understand this command and ignores it (printing a
message)
- libxl doesn't wait for the answer and immediately pauses the domain
anyway
- destroy is the ungraceful (force) operation and should not
negotiate with qemu anyway
- even in the graceful shutdown case, there would actually be nothing
that qemu needs to do.
Under some circumstances, this entry in xenstore will survive the
domain's death, ie be leaked.
So remove the erroneous code.
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
Keir Fraser [Wed, 19 Jan 2011 18:24:26 +0000 (18:24 +0000)]
Disable tmem by default for 4.1 release.
Although one major source of order>0 allocations has been removed,
others still remain, so re-disable tmem until the issue can be fixed
properly.
Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
Keir Fraser [Wed, 19 Jan 2011 15:29:04 +0000 (15:29 +0000)]
x86_emulate: set the operand size for SMSW/reg writeback.
Otherwise it defaults to 0 bytes.
Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
Signed-off-by: Keir Fraser <keir@xen.org>
George Dunlap [Mon, 17 Jan 2011 14:29:01 +0000 (14:29 +0000)]
PoD,hap: Fix logdirty mode when using hardware assisted paging
When writing a writable p2m entry for a pfn, we need to mark the pfn
dirty to avoid corruption when doing live migration.
Marking the page dirty exposes another issue, where there are
excessive sweeps for zero pages if there's a mismatch between PoD
entries and cache entries. Only sweep for zero pages if we actually
need more memory.
Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
Acked-by: Tim Deegan <Tim.Deegan@citrix.com>
George Dunlap [Mon, 17 Jan 2011 14:24:13 +0000 (14:24 +0000)]
PoD: Allow pod_set_cache_target hypercall to be preempted
For very large VMs, setting the cache target can take long enough that
dom0 complains of soft lockups. Allow the hypercall to be preempted.
Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
Acked-by: Tim Deegan <Tim.Deegan@citrix.com>
Jim Fehlig [Tue, 18 Jan 2011 17:23:24 +0000 (17:23 +0000)]
xend: improve psudeo-bootloader support for external block scripts
Userspace tools support external block scripts (e.g. block-drbd
provided by drbd project). The psuedo-bootloader setup code in
xend has a few limitations wrt external block scripts, which this
patch addresses.
blkif.py: parse_uname() utility function should be able to parse a
disk specifier understood by the rest of the tools.
XendDomainInfo.py: Block devices using external block scripts must
be attached to dom0 before running the psuedo-bootloader.
Signed-off-by: Jim Fehlig <jfehlig@novell.com>
Tested-by: Shriram Rajagopalan <rshriram@gmail.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
Jim Fehlig [Tue, 18 Jan 2011 17:20:55 +0000 (17:20 +0000)]
xend: drbd: Revert 19444:
152257350930
Remove some more "drbd" cruft from xend. This is not necessary for
drbd to work with Xen.
Requested-by: Jim Fehlig <jfehlig@novell.com>
Tested-by: Shriram Rajagopalan <rshriram@gmail.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
Jan Beulich [Tue, 18 Jan 2011 12:28:10 +0000 (12:28 +0000)]
VT-d/ATS: misc fixes
First of all there were three places potentially de-referencing NULL
(two after an allocation failure, and one after a failed lookup).
Second, if ATS_ENABLE was already set, the device would not have got
added to the ats_devices list, potentially resulting in
dev_invalidate_iotlb() doing an incomplete job.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
Keir Fraser [Tue, 18 Jan 2011 10:28:22 +0000 (10:28 +0000)]
xen-unstable/blkif: Add trim operation interface
Trim operation is a request for the underlying block device to mark
extents to be erased. Add the operation code and ring data structure
to the public header file.
Trim operations are passed with sector_number as the sector index to
begin trim operations at and nr_sectors as the number of sectors to
be trimmed. The specified sectors should be trimmed if the underlying
block device supports trim operations, or a BLKIF_RSP_EOPNOTSUPP
should be returned. More information about trim operations at;
http://t13.org/Documents/UploadedDocuments/docs2008/
e07154r6-Data_Set_Management_Proposal_for_ATA-ACS2.doc
Signed-off-by: Owen Smith <owen.smith@citrix.com>
Keir Fraser [Tue, 18 Jan 2011 09:04:04 +0000 (09:04 +0000)]
xen: fix XEN_DOMCTL_memory_mapping to not return with domain RCU lock held
Broken in 20358:
ecc649ec3675
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Keir Fraser [Tue, 18 Jan 2011 09:01:57 +0000 (09:01 +0000)]
xen: stringify assertion condition for printing sooner.
So that:
(XEN) Assertion '!(((*({ unsigned long __ptr; __asm__ ("" :
"=r"(__ptr) : "0"(&per_cpu____preempt_count));
(typeof(&per_cpu____preempt_count)) (__ptr +
(get_cpu_info()->per_cpu_offset)); }))) ||
((irq_stat[(((get_cpu_info()->processor_id)1...
becomes:
(XEN) Assertion '"!in_atomic()"' failed at softirq.c:61
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Olaf Hering [Mon, 17 Jan 2011 18:05:52 +0000 (18:05 +0000)]
tools/hotplug/Linux: allow hardlinked files for block device images
tools/hotplug/Linux/block change for this losetup -a output:
(inode 12 is listed twice due to hardlinks)
/dev/loop0: [0809]:139267 (/abuild/vdisk-sles11_2-disk0)
/dev/loop1: [0809]:139266 (/abuild/vdisk-sles11_1-disk1)
/dev/loop3: [0809]:139267 (/abuild/vdisk-sles11_2-disk0)
/dev/loop5: [0809]:139273 (/abuild/vdisk-sles11_5-disk1)
/dev/loop8: [0809]:12 (/abuild/bootiso-xenpaging-sles11_5.iso)
/dev/loop10: [0809]:12 (/abuild/bootiso-xenpaging-sles11_4.iso)
/dev/loop11: [0809]:139271 (/abuild/vdisk-sles11_4-disk0)
Without this change, $dev would contain /dev/loop8\n/dev/loop10
Applies to 4.0 and 4.1
Signed-off-by: Olaf Hering <olaf@aepfle.de>
Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Ian Jackson [Mon, 17 Jan 2011 17:55:12 +0000 (17:55 +0000)]
Config.mk: commented-out CONFIG_QEMU example now uses XEN_ROOT
If you actually set it to a relative path, the qemu build breaks.
So this commented-out rune (an example) should arrange to be absolute.
Reported-by: M A Young <m.a.young@durham.ac.uk>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Ian Campbell [Mon, 17 Jan 2011 17:52:39 +0000 (17:52 +0000)]
tools/hotplug/Linux: start xen daemons in runlevel 2.
This is the default runlevel on a Debian system.
In addition update-rc.d complains:
update-rc.d: warning: xencommons stop runlevel arguments (0 1 6) do not match LSB Default-Stop values (1)
and it seems reasonable to stop the daemons during shutdown or reboot
so make that change as well.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Sergey Tovpeko [Mon, 17 Jan 2011 17:48:16 +0000 (17:48 +0000)]
libxl: fix gfx_passthrough config option (including dropped hunk)
Add the missing hunk from 22711:
4f6fee3a456e (fixed up for intervening
movement of dm info) to actually pass the -gfx_passthru argument to
qemu.
Also change the idl comment for the gfx_passthrough config setting to
that from Sergey.
Author: Sergey Tovpeko <tovpeko@altell.ru>
Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
diff -r
c281e9c58146 -r
9108ce3fc62c tools/libxl/libxl.idl
--- a/tools/libxl/libxl.idl Mon Jan 17 17:31:24 2011 +0000
+++ b/tools/libxl/libxl.idl Mon Jan 17 17:43:22 2011 +0000
@@ -152,7 +152,7 @@ libxl_device_model_info = Struct("device
("sdl", bool, False, "sdl enabled or disabled"),
("opengl", bool, False, "opengl enabled or disabled (if enabled requires sdl enabled)"),
("nographic", bool, False, "no graphics, use serial port"),
- ("gfx_passthru", bool, False, "disable qemu graphics for PCI passthru of GPU from host"),
+ ("gfx_passthru", bool, False, "graphics passthrough enabled or disabled"),
("serial", string, False, "serial port re-direct to pty deivce"),
("boot", string, False, "boot order, for example dca"),
("usb", bool, False, "usb support enabled or disabled"),
diff -r
c281e9c58146 -r
9108ce3fc62c tools/libxl/xl_cmdimpl.c
--- a/tools/libxl/xl_cmdimpl.c Mon Jan 17 17:31:24 2011 +0000
+++ b/tools/libxl/xl_cmdimpl.c Mon Jan 17 17:43:22 2011 +0000
@@ -682,6 +682,9 @@ static void parse_config_data(const char
b_info->video_memkb = l * 1024;
xlu_cfg_replace_string (config, "kernel", &b_info->kernel.path);
+
+ if (!xlu_cfg_get_long (config, "gfx_passthru", &l))
+ b_info->gfx_passthru = l;
if (c_info->hvm == 1) {
if (!xlu_cfg_get_long (config, "pae", &l))
Christoph Egger [Mon, 17 Jan 2011 17:31:24 +0000 (17:31 +0000)]
tools/hotplug/NetBSD: update netbsd scripts (interface names)
sysctl fail due to the '.' in the interface name:
Jan 10 00:02:26 paris /netbsd: xvif108.0: could not attach sysctl nodes
Jan 10 00:02:57 paris /netbsd: sysctl_createv: sysctl_create(xvif108.0)
returned 22
The kernel driver have recently been fixed and attached patch updates
to the hotplug scripts accordingly.
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
Daniel De Graaf [Mon, 17 Jan 2011 17:28:30 +0000 (17:28 +0000)]
libxc: Remove set_max_grants in linux
The maximum number of grants is now constrained domain-wide in linux,
so set_max_grants should be a noop there. Previously, this constraint
was per-file-description.
Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
Ian Jackson [Mon, 17 Jan 2011 17:24:21 +0000 (17:24 +0000)]
Merge
Christoph Egger [Mon, 17 Jan 2011 17:18:38 +0000 (17:18 +0000)]
libxl: fix guest networking on NetBSD
As previously reported when I start guests with xl then the
guest network does not work because the qemu-ifup script
no longer runs.
NetBSD doesn't have something like udev. Changing xm/xend,
libxl and xenbackendd to make everything behave the same way
is a lot more intrusive than enabling it for NetBSD again.
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
Ian Campbell [Mon, 17 Jan 2011 17:14:20 +0000 (17:14 +0000)]
tools/blktap, blktap2: include <sys/mount.h> instead of <linux/fs.h>
The former is a userspace sanitised header which contains the
definitions we need. In some distros linux/fs.h defines WRITE which
conflicts with blktaps own use of that name.
Also there is no reason to use <linux/errno.h> over the more normal
<errno.h>.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
Keir Fraser [Fri, 14 Jan 2011 16:38:51 +0000 (16:38 +0000)]
rcupdate: Make rcu_barrier() more paranoia-proof
I'm not sure my original barrier function is correct. It may allow a
CPU to exit the barrier loop, with no local work to do, while RCU work
is pending on other CPUs and needing one or more quiescent periods to
flush the work through.
Although rcu_pending() may handle this, it is easiest to follow
Linux's example and simply call_rcu() a callback function on every
CPU. When the callback has executed on every CPU, we know that all
previously-queued RCU work is completed, and we can exit the barrier.
Signed-off-by: Keir Fraser <keir@xen.org>
Liu, Jinsong [Fri, 14 Jan 2011 15:47:01 +0000 (15:47 +0000)]
PoD: Fix two code comments
Signed-off-by: Liu, Jinsong <jinsong.liu@intel.com>
Acked-by: George Dunlap <george.dunlap@citrix.com>
Keir Fraser [Fri, 14 Jan 2011 15:21:24 +0000 (15:21 +0000)]
hvmloader: Fixes to printf() implementation.
1. Remove unportable O and D format specifiers
2. Fix X format specifier to print upper-case hex characters
3. Fix d format specifier to print -ve numbers
4. Fix handling of int vs. long (although not actually an issue
for the i386 compile target)
5. Don't use the antiquated C 'register' type attribute.
Signed-off-by: Keir Fraser <keir@xen.org>
Keir Fraser [Fri, 14 Jan 2011 15:18:02 +0000 (15:18 +0000)]
x86 hvm: Do not check-and-fail on in_atomic() in hvm_copy().
Stub this out for 4.0, as PV-on-HVM drivers hit this case when
performing grant-table hypercalls. Grant-table code currently accesses
guest memory under bug per-domain lock. The test in hvm_copy() is not
necessary until the xenpaging implementation is more complete, which
will not now be until after 4.1.0.
Signed-off-by: Keir Fraser <keir@xen.org>
Jan Beulich [Fri, 14 Jan 2011 14:26:11 +0000 (14:26 +0000)]
x86-64: pci_probe must be resident
... now that we reference it from emulate_privileged_op().
Signed-off-by: Jan Beulich <jbeulich@novell.com>
Ian Campbell [Fri, 14 Jan 2011 14:25:31 +0000 (14:25 +0000)]
libxc: build fix with debugging disabled.
Currently hypercalls have only 5 arguments, hypercall->arg[0..4]. Do
not try and print arg[5] else:
cc1: warnings being treated as errors
xenctrl_osdep_ENOSYS.c: In function
'ENOSYS_privcmd_hypercall':
xenctrl_osdep_ENOSYS.c:30: error: array subscript is above
array bounds
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Keir Fraser [Fri, 14 Jan 2011 14:19:55 +0000 (14:19 +0000)]
x86: On CPU online/offline from dom0, try flushing RCU work on EBUSY.
Although the caller should react appropriately to EBUSY, if the error
is due to pending RCU work then we can help things along by executing
rcu_barrier() and then retrying. To this end, this changeset is an
optimisation only.
Signed-off-by: Keir Fraser <keir@xen.org>
Keir Fraser [Fri, 14 Jan 2011 14:18:31 +0000 (14:18 +0000)]
x86 acpi: Fix crash in enable_nonboot_cpus() on wakeup from S3/S4
Bringing a CPU back online can require RCU work to be flushed, because
the per-cpu data from last time the CPU was online may not yet be
deallocated. Use the new rcu_barrier() interface function to achieve
this.
Signed-off-by: Keir Fraser <keir@xen.org>
Keir Fraser [Fri, 14 Jan 2011 14:16:42 +0000 (14:16 +0000)]
rcupdate: Implement rcu_barrier() to synchronously flush RCU work.
Signed-off-by: Keir Fraser <keir@xen.org>
Keir Fraser [Fri, 14 Jan 2011 14:16:04 +0000 (14:16 +0000)]
stop_machine: Allow specified function to run on all CPUs.
Signed-off-by: Keir Fraser <keir@xen.org>
Keir Fraser [Fri, 14 Jan 2011 14:07:39 +0000 (14:07 +0000)]
x86 sysctl: Remove unused CPU hotplug status stuff.
Signed-off-by: Keir Fraser <keir@xen.org>
Keir Fraser [Fri, 14 Jan 2011 09:53:22 +0000 (09:53 +0000)]
tools/misc/xen-hptool: Silently retry on CPU hotplug EBUSY failure.
EBUSY is a legitimate soft failure, due to inability to acquire a
lock, or because RCU work has not been done since a CPU was last
offlined.
Signed-off-by: Keir Fraser <keir@xen.org>
Keir Fraser [Fri, 14 Jan 2011 09:52:02 +0000 (09:52 +0000)]
cpu hotplug: Core functions are quiet on failure.
This was already inconsistent, so make them consistently quiet and
leave it to callers to log an error. Add suitable error logging to the
arch-specific CPU bringup loops,
In particular this avoids printing error on EBUSY, in which case
caller may want a silent retry loop.
Signed-off-by: Keir Fraser <keir@xen.org>
Keir Fraser [Fri, 14 Jan 2011 09:11:28 +0000 (09:11 +0000)]
x86 fpu: Code clean up. Eliminate per-cpu xsave init verbosity.
Signed-off-by: Keir Fraser <keir@xen.org>
Keir Fraser [Fri, 14 Jan 2011 08:34:53 +0000 (08:34 +0000)]
x86: Avoid calling xsave_alloc_save_area before xsave_init
Currently, xsave_alloc_save_area will be called in
init_idle_domain->scheduler_init->alloc_vcpu->vcpu_initialise calls
with xsave_cntxt_size=0, it is earlier than xsave_init called in
identity_cpu(). This may causing buffer overflow on xmem_pool.
Idle domain isn't using FPU,SSE,AVX or any such extended state and
doesn't need it saved. xsave_{alloc,free}_save_area() should
test-and-exit on is_idle_vcpu(), and our context switch code should
not be doing XSAVE when switching out an idle vcpu.
Signed-off-by: Wei Gang <gang.wei@intel.com>
Signed-off-by: Keir Fraser <keir@xen.org>
Allen Kay [Fri, 14 Jan 2011 08:11:46 +0000 (08:11 +0000)]
vt-d: quirks for Sandybridge errata workaround, WLAN, VT-d fault escalation
Adding errata workaround for newly released Sandybridge processor
graphics, additional WLAN device ID's for WLAN quirk, a quirk for
masking VT-d fault escalation to IOH HW that can cause system hangs on
some OEM hardware where the BIOS erroneously escalates VT-d faults to
the platform.
Signed-off-by: Allen Kay <allen.m.kay@intel.com>
Keir Fraser [Fri, 14 Jan 2011 08:08:37 +0000 (08:08 +0000)]
vt-d: Fix crash issue when not sharing EPT and VT-d tables.
Signed-off-by: Allen Kay <allen.m.kay@intel.com>
Keir Fraser [Fri, 14 Jan 2011 08:02:26 +0000 (08:02 +0000)]
pv-drivers: use PCI interfaces to request IO and MEM resources on platform device
This is the correct interface to use and something has broken the use
of the previous incorrect interface (which fails because the request
conflicts with the resources assigned for the PCI device itself
instead of nesting like the PCI interfaces do).
pci_request_region() has been available since at least Linux 2.6.5.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Jan Beulich <jbeulich@novell.com>
Keir Fraser [Thu, 13 Jan 2011 16:00:59 +0000 (16:00 +0000)]
Update Xen version to 4.1.0-rc2-pre
Tim Deegan [Thu, 13 Jan 2011 15:46:13 +0000 (15:46 +0000)]
x86/mm: make page-sharing use the proper typecount functions
instead of having its own cmpxchg loops.
This should remove some confusion about the use of PGT_none,
and also makes page-sharing participate properly in the TLB
flushing discipline.
Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
Tim Deegan [Thu, 13 Jan 2011 15:46:13 +0000 (15:46 +0000)]
x86/mm: fix EPT PoD locking to match the normal p2m case.
This recursive-locking bug was fixed in the main p2m code in
20269:
fd3d5d66c446 (in October 2009) but has lurked unseen in
the EPT side since then. Copy the fix across.
Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
Keir Fraser [Thu, 13 Jan 2011 15:38:48 +0000 (15:38 +0000)]
Added signature for changeset
2a60be40e2cb
Keir Fraser [Thu, 13 Jan 2011 15:38:38 +0000 (15:38 +0000)]
Added tag 4.1.0-rc1 for changeset
2a60be40e2cb
Keir Fraser [Thu, 13 Jan 2011 15:38:29 +0000 (15:38 +0000)]
Update Xen version to 4.1.0-rc1
Ian Jackson [Thu, 13 Jan 2011 01:26:44 +0000 (01:26 +0000)]
xl: correct test for domid on error exit from domain_create
The previous changeset 22739:
d839631b6048 changed the initialisation
of domid without changing the corresponding cleanup test. Oops.
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Ian Jackson [Thu, 13 Jan 2011 00:18:35 +0000 (00:18 +0000)]
xl: save domain config (userdata) under correct domid/uuid
Recent changes caused the domain config file to be saved under dom0's
filename in /var/lib/xen. This was due to the config file being saved
before the domain was created and thus before the domid and uuid were
known.
Fix this by moving the saving code to after creation.
Also, change the "default" initialisation of domid in
xl_cmdimpl.c:create_domain to be domid=-1. That provides a more
obviously wrong value than 0 (which refers to dom0) so that other bugs
of this kind would be more likely to show up.
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Tested-by: Ian Jackson <ian.jackson@eu.citrix.com>
Ian Jackson [Wed, 12 Jan 2011 14:14:13 +0000 (14:14 +0000)]
libxl: config parser: Rebuild config file parser scanner (rerun flex)
The scanner from c/s 22735:
cb94dbe20f97 is buggy and crashes with a
segmentation fault. Rebuilding the sanner appears to fix the problem
so it appears that I somehow accidentally checked in a scanner which
doesn't correspond to the committed scanner source code.
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Keir Fraser [Wed, 12 Jan 2011 10:53:56 +0000 (10:53 +0000)]
Revert 22706:
ca10302ac285 "xenpaging: update machine_to_phys_mapping[] during page deallocation"
Crashes during boot, due to m2p tables not being set up early enough.
Signed-off-by: Keir Fraser <keir@xen.org>
Ian Jackson [Tue, 11 Jan 2011 19:41:53 +0000 (19:41 +0000)]
Merge
Ian Jackson [Tue, 11 Jan 2011 19:31:41 +0000 (19:31 +0000)]
libxl: config parser: print warning for apparent arbitrary python
The characters - + . ( ) : are not legal in xl config files but are
valid Python and use of at least one of them is almost essential for
writing arbitrary Python in the config file.
So if we see one of these during lexing, note it, and then after the
parse is complete if it failed we print a special extra warning.
Currently this warning refers to the nonexistent wiki page
http://wiki.xen.org/xenwiki/PythonInXlConfig
which will have to be written (and/or given a better name) before the
actual 4.1 release.
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Ian Jackson [Tue, 11 Jan 2011 19:30:16 +0000 (19:30 +0000)]
libxl: config parser: rerun flex (Debian lenny 2.5.35)
We are going to need to rerun flex to generate new lexer code. So
rerun it now to separate out the irrelevant from the relevant changes
to the generated files.
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Ian Jackson [Tue, 11 Jan 2011 19:29:05 +0000 (19:29 +0000)]
libxl: config parser: make CfgParseContext initialisation common
xlu_cfg_readfile and xlu_cfg_readdata had some somewhat-boilerplate
code for initialisation, parsing, and cleanup. Make that common.
No functional change.
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Ian Jackson [Tue, 11 Jan 2011 19:28:22 +0000 (19:28 +0000)]
libxl: config parser: do not segfault in some error paths
In error paths, xlu__cfg_set_free can be called on NULL.
So check for that rather than segfaulting.
Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Gianni Tedesco [Tue, 11 Jan 2011 18:58:02 +0000 (18:58 +0000)]
tools/python/pyxl: Updates to builtin-type marshalling functions
Allow setting a string field to None as a way to zero it out.
Implement setting/getting libx_file_references as strings.
Produce relevant Exceptions marshallers which remain unimplemented.
Signed-off-by: Gianni Tedesco <gianni.tedesco@citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
Gianni Tedesco [Tue, 11 Jan 2011 18:57:37 +0000 (18:57 +0000)]
tools/python/pyxl: Export PCI passthrough related libxl functions
Signed-off-by: Gianni Tedesco <gianni.tedesco@citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
Gianni Tedesco [Tue, 11 Jan 2011 18:57:16 +0000 (18:57 +0000)]
tools/python/pyxl: Allow subclassing of auto-generated python types
Signed-off-by: Gianni Tedesco <gianni.tedesco@citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>